package com.caregiver.watch.business.care.model.vo;

import com.caregiver.watch.business.user.enums.EcgAnalysisResultEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @Description: 健康数据VO
 * @Author 疆戟
 * @Date 2025/9/27 20:08
 * @Version 1.0
 */
@Data
@Schema(description = "健康数据VO")
public class HealthDataVo {

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "设备唯一标识")
    private String deviceUuid;

    @Schema(description = "睡眠时长(分钟)")
    private Integer sleepDuration;

    @Schema(description = "心率")
    private Integer heartRate;

    @Schema(description = "心率测量时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime heartRateTime;

    /**
     * 收缩压(mmHg)
     * 对应数据库字段: systolic
     */
    @Schema(description = "收缩压")
    private Integer systolic;

    /**
     * 舒张压(mmHg)
     * 对应数据库字段: diastolic
     */
    @Schema(description = "舒张压")
    private Integer diastolic;

    @Schema(description = "血压测量时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime bloodPressureTime;

    @Schema(description = "压力值")
    private Integer stressValue;

    @Schema(description = "压力值测量时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime stressTime;

    @Schema(description = "心脏健康" +
            "NO_RESULT 无结果, 有干扰或者数据异常" +
            "SINUS_RHYTHM 窦性心率" +
            "SINUS_BRADYCARDIA 窦性心率过缓" +
            "SINUS_TACHYCARDIA 窦性心率过速" +
            "ARRHYTHMIA_PREMATURE 心律不齐（早搏）" +
            "ARRHYTHMIA_AF 心律不齐（房颤）" +
            "TACHYCARDIA_SVT 心率过速（室上性心动过速）")
    private EcgAnalysisResultEnum heartHealth;

    @Schema(description = "心电测量时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime ecgTime;

    @Schema(description = "血氧")
    private BigDecimal bloodOxygen;

    @Schema(description = "血氧测量时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime bloodOxygenTime;

    @Schema(description = "体温")
    private BigDecimal bodyTemperature;

    @Schema(description = "体温测量时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private LocalDateTime bodyTemperatureTime;
}
